using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICPrcPlyEntrySpecMap : EntityTypeConfiguration<ICPrcPlyEntrySpec>
    {
        public ICPrcPlyEntrySpecMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FInterID, t.FItemID, t.FRelatedID });

            // Properties
            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FRelatedID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("ICPrcPlyEntrySpec");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FRelatedID).HasColumnName("FRelatedID");
            this.Property(t => t.FLPriceCuryID).HasColumnName("FLPriceCuryID");
            this.Property(t => t.FLowPrice).HasColumnName("FLowPrice");
            this.Property(t => t.FCanSell).HasColumnName("FCanSell");
            this.Property(t => t.FLPriceCtrl).HasColumnName("FLPriceCtrl");
            this.Property(t => t.FFlag).HasColumnName("FFlag");
        }
    }
}
